import { buildGraph,NodeInput,EdgeInput } from '../util/graph';
import graphSample from '../assets/graph-sample.json';
import { genDAG, LayoutOption, layoutDAG } from '../algorithm/dag-layout';
// build graph from assets/graph-sample.json
const graph = buildGraph(graphSample.nodes as NodeInput[], graphSample.edges as EdgeInput[]);
console.log(graph)
// convert to visual dag graph
const visualGraph = genDAG(graph, new LayoutOption());
console.log(visualGraph)
layoutDAG(visualGraph, new LayoutOption());
console.log(visualGraph)